package com.itheima.ydd.utils;

import io.jsonwebtoken.Claims;
//校验当前用户是否为admin
public class AdminCheak {
    public  static boolean cheak(String token){
        Claims claims = AppJwtUtil.tokenToOut(token);
        if (claims!=null){
            String id = (String) claims.get("id");
            return id.equals("1")?true:false;
        }return false;
    }
}
